function SrvProperty(params){ 
	 
}

SrvProperty.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new SrvProperty.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new SrvProperty.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new SrvProperty.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.spId=function(spId){if(this.proxy)return this.getProxy().spId(spId);  this.put("spId", spId);return this;};
	/** and sp_id is null */
	this.spIdNull=function(){if(this.proxy)return this.getProxy().spIdNull();if(this.get("spIdNot")==null)this.put("spIdNot", "");this.put("spId", null);return this;};
	/** not .... */
	this.spIdNot=function(){if(this.proxy)return this.getProxy().spIdNot();this.put("spIdNot", "not");return this;};
	this.spIdNotNull=function(){if(this.proxy)return this.getProxy().spIdNotNull();this.put("spIdNot", "not");this.put("spId", null);return this;};
	this.spIdNot=function(spId){if(this.proxy)return this.getProxy().spIdNot(spId);this.put("spIdNot", "not");this.put("spId", spId);return this;};
		
	/** and sp_id <= ? */
	this.spIdMin=function(min){if(this.proxy)return this.getProxy().spIdMin(min);this.put("spIdMin", min);return this;};
	/** and sp_id >= ? */
	this.spIdMax=function(max){if(this.proxy)return this.getProxy().spIdMax(max);this.put("spIdMax", max);return this;};
		
		
	this.spIdIn=function(ids){
		if(this.proxy)return this.getProxy().spIdIn(ids);  this.put("spIdIn", ids);return this;
	};	
		 
	
	
	/** 名称 [非空]    属性名称，如html中select的option的text内容   **/
	this.spName=function(spName){if(this.proxy)return this.getProxy().spName(spName);  this.put("spName", spName);return this;};
	/** and sp_name is null */
	this.spNameNull=function(){if(this.proxy)return this.getProxy().spNameNull();if(this.get("spNameNot")==null)this.put("spNameNot", "");this.put("spName", null);return this;};
	/** not .... */
	this.spNameNot=function(){if(this.proxy)return this.getProxy().spNameNot();this.put("spNameNot", "not");return this;};
	this.spNameNotNull=function(){if(this.proxy)return this.getProxy().spNameNotNull();this.put("spNameNot", "not");this.put("spName", null);return this;};
	this.spNameNot=function(spName){if(this.proxy)return this.getProxy().spNameNot(spName);this.put("spNameNot", "not");this.put("spName", spName);return this;};
		
		 
	
	
	/** 类型 [非空] [SrvProperty]      **/
	this.spParent=function(spParent){if(this.proxy)return this.getProxy().spParent(spParent);  this.put("spParent", spParent);return this;};
	/** and sp_parent is null */
	this.spParentNull=function(){if(this.proxy)return this.getProxy().spParentNull();if(this.get("spParentNot")==null)this.put("spParentNot", "");this.put("spParent", null);return this;};
	/** not .... */
	this.spParentNot=function(){if(this.proxy)return this.getProxy().spParentNot();this.put("spParentNot", "not");return this;};
	this.spParentNotNull=function(){if(this.proxy)return this.getProxy().spParentNotNull();this.put("spParentNot", "not");this.put("spParent", null);return this;};
	this.spParentNot=function(spParent){if(this.proxy)return this.getProxy().spParentNot(spParent);this.put("spParentNot", "not");this.put("spParent", spParent);return this;};
		
		
	this.spParentIn=function(ids){
		if(this.proxy)return this.getProxy().spParentIn(ids);  this.put("spParentIn", ids);return this;
	};	
		 
	
	
	/** 标识     程序变量命名规则格式   **/
	this.spFlag=function(spFlag){if(this.proxy)return this.getProxy().spFlag(spFlag);  this.put("spFlag", spFlag);return this;};
	/** and sp_flag is null */
	this.spFlagNull=function(){if(this.proxy)return this.getProxy().spFlagNull();if(this.get("spFlagNot")==null)this.put("spFlagNot", "");this.put("spFlag", null);return this;};
	/** not .... */
	this.spFlagNot=function(){if(this.proxy)return this.getProxy().spFlagNot();this.put("spFlagNot", "not");return this;};
	this.spFlagNotNull=function(){if(this.proxy)return this.getProxy().spFlagNotNull();this.put("spFlagNot", "not");this.put("spFlag", null);return this;};
	this.spFlagNot=function(spFlag){if(this.proxy)return this.getProxy().spFlagNot(spFlag);this.put("spFlagNot", "not");this.put("spFlag", spFlag);return this;};
		
		 
	
	
	/** 数值        **/
	this.spNumber=function(spNumber){if(this.proxy)return this.getProxy().spNumber(spNumber);  this.put("spNumber", spNumber);return this;};
	/** and sp_number is null */
	this.spNumberNull=function(){if(this.proxy)return this.getProxy().spNumberNull();if(this.get("spNumberNot")==null)this.put("spNumberNot", "");this.put("spNumber", null);return this;};
	/** not .... */
	this.spNumberNot=function(){if(this.proxy)return this.getProxy().spNumberNot();this.put("spNumberNot", "not");return this;};
	this.spNumberNotNull=function(){if(this.proxy)return this.getProxy().spNumberNotNull();this.put("spNumberNot", "not");this.put("spNumber", null);return this;};
	this.spNumberNot=function(spNumber){if(this.proxy)return this.getProxy().spNumberNot(spNumber);this.put("spNumberNot", "not");this.put("spNumber", spNumber);return this;};
		
	/** and sp_number <= ? */
	this.spNumberMin=function(min){if(this.proxy)return this.getProxy().spNumberMin(min);this.put("spNumberMin", min);return this;};
	/** and sp_number >= ? */
	this.spNumberMax=function(max){if(this.proxy)return this.getProxy().spNumberMax(max);this.put("spNumberMax", max);return this;};
		
		
	this.spNumberIn=function(ids){
		if(this.proxy)return this.getProxy().spNumberIn(ids);  this.put("spNumberIn", ids);return this;
	};	
		 
	
	
	/** 串值        **/
	this.spValue=function(spValue){if(this.proxy)return this.getProxy().spValue(spValue);  this.put("spValue", spValue);return this;};
	/** and sp_value is null */
	this.spValueNull=function(){if(this.proxy)return this.getProxy().spValueNull();if(this.get("spValueNot")==null)this.put("spValueNot", "");this.put("spValue", null);return this;};
	/** not .... */
	this.spValueNot=function(){if(this.proxy)return this.getProxy().spValueNot();this.put("spValueNot", "not");return this;};
	this.spValueNotNull=function(){if(this.proxy)return this.getProxy().spValueNotNull();this.put("spValueNot", "not");this.put("spValue", null);return this;};
	this.spValueNot=function(spValue){if(this.proxy)return this.getProxy().spValueNot(spValue);this.put("spValueNot", "not");this.put("spValue", spValue);return this;};
		
		 
	
	
	/** 文本        **/
	this.spText=function(spText){if(this.proxy)return this.getProxy().spText(spText);  this.put("spText", spText);return this;};
	/** and sp_text is null */
	this.spTextNull=function(){if(this.proxy)return this.getProxy().spTextNull();if(this.get("spTextNot")==null)this.put("spTextNot", "");this.put("spText", null);return this;};
	/** not .... */
	this.spTextNot=function(){if(this.proxy)return this.getProxy().spTextNot();this.put("spTextNot", "not");return this;};
	this.spTextNotNull=function(){if(this.proxy)return this.getProxy().spTextNotNull();this.put("spTextNot", "not");this.put("spText", null);return this;};
	this.spTextNot=function(spText){if(this.proxy)return this.getProxy().spTextNot(spText);this.put("spTextNot", "not");this.put("spText", spText);return this;};
		
		 
	
	
	/** 状态 [非空]   1:有效 0:内容     **/
	this.spStatus=function(spStatus){if(this.proxy)return this.getProxy().spStatus(spStatus);  this.put("spStatus", spStatus);return this;};
	/** and sp_status is null */
	this.spStatusNull=function(){if(this.proxy)return this.getProxy().spStatusNull();if(this.get("spStatusNot")==null)this.put("spStatusNot", "");this.put("spStatus", null);return this;};
	/** not .... */
	this.spStatusNot=function(){if(this.proxy)return this.getProxy().spStatusNot();this.put("spStatusNot", "not");return this;};
	this.spStatusNotNull=function(){if(this.proxy)return this.getProxy().spStatusNotNull();this.put("spStatusNot", "not");this.put("spStatus", null);return this;};
	this.spStatusNot=function(spStatus){if(this.proxy)return this.getProxy().spStatusNot(spStatus);this.put("spStatusNot", "not");this.put("spStatus", spStatus);return this;};
		
		
	this.spStatusIn=function(ids){
		if(this.proxy)return this.getProxy().spStatusIn(ids);  this.put("spStatusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有系统属性 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/configurator/property.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取系统属性分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/configurator/property.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取系统属性 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/configurator/property.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

SrvProperty.get = function(id){
	var protocol = ux.ajax("/admin/configurator/property.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.srvProperty;
	return null;
}

SrvProperty.where = new SrvProperty.Where(0,true);